package com.whmskj.xjlhbc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whmskj.xjlhbc.domain.CorpMember;
import com.whmskj.xjlhbc.domain.Yg01employeefiles;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CorpMemberMapper extends BaseMapper<CorpMember> {

    @Select("select roleName from jit_app_role_member where memberType = 0 and authId=#{memberId} union" +
            " select roleName from jit_app_role_member a left join corp_dept b on a.authId = b.deptId left join corp_dept_member c on b.deptId=c.deptId" +
            " where memberType = 1 and c.memberId=#{memberId}")
    List<String> selectRoleNames(String memberId);

    @Select("select elementDefine from jit_app_element_sync where fullName = #{roleName} limit 1")
    String selectRoleElement(String roleName);
    @Select("select * from yg01EmployeeFiles where contactCall=#{phone}")
    List<Yg01employeefiles> selectScYgByPhone(String phone);
}
